interface Table {
  name: string
  aliasName: string
  charset: string
  comment: string
  rowFormat: string
  collate: string
  engine: string
}

interface Field {
  id: number
  name: string
  primaryKey: boolean
  aliasName: string
  comment: string
  charset: string
  collate: string
  defaultValue: string
  type: string
  sort: number
  required: boolean
  maxLength: number
  decimalDigits: number


  updateByCurrentTime?:boolean
}

interface ActionDetail {
  rawScript: string
  saveScript: string
  actionType: string
  isPage?: boolean
  pageParamName?: {
    pageNo: string
    pageSize: string
  }
  fieldSelected?: Array<{
    table: string
    isSelectAllField: boolean
    fields: string[]
    fieldAliasNameMapArray: any[]
    isExpand: boolean
  }>
  whereSelectList?: Array<{
    field: string
    logic: string
    operator: string
    valueA: string
    order: number
    valueB: string
    isParamName: boolean
  }>
  orderSelectList?: Array<{
    field: string
    orderType: string
  }>
}

interface Action {
  id: number
  label: string
  name: string
  type: string
  before: string
  after: string
  shell:string
  detail: ActionDetail
}

interface Model {
  table: Table
  field: Field[]
  action: Action[]
}

export type { Table, Field, ActionDetail, Action, Model }
